<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <span v-if="seen">内容显示</span><br>
        <button v-on:click="showhidden" value="">{{msg}}</button>
  
    </div>
</body>
<script src="https://unpkg.com/vue@next"></script>
<script>
    const aa={
        data(){
            return{
            seen:true,
            msg:'隐藏'
            }
        },
        methods:{
            showhidden(){
                this.seen=!this.seen
                if(this.seen){
                    this.msg='隐藏'
                }else{
                    this.msg='显示'
                }
            }
      
        }
        }
        Vue.createApp(aa).mount("#app")
  
</script>
</html>